exports.delete = (req,res) => {

    var bodyParams = req.routeInfo.bodyParams;

    //删除文档信息
    var sql = "delete from docs where d_id = " + bodyParams.d_id;

    sqliteDb.run(sql,function(error){

        if(error){
            return RES.errorResponse(res,"抱歉，文档删除失败");
        }

        //删除参数信息
        sql = "delete from docs_request_parameter where drp_did = " + bodyParams.d_id;

        sqliteDb.run(sql,function(error){

            if(error){
                return RES.errorResponse(res,"抱歉，文档删除失败");
            }

            return RES.successResponse(res);
    
        });
        
    });

 }